import service from '@/utils/request.js'


// 登录接口
export function Loginservice(data) {
    return service({
        url: '/prod-api/auth/api/auth/credentials/login',
        headers: {
            isToken: false,
            repeatSubmit: false,
            'Client-Type': 'DP',
        },
        method: 'post',
        data: data
    })
}

// 设备告警
export function Dangerdevived(data) {
    return service({
        url: '/prod-api/dam/api/damwarn/list',
        method: 'POST',
        data,
    })
}

// 设备告警yuzhi
export function getdangervalue(params) {
    return service({
        url: '/prod-api/dam/api/damwarnsetting/getSettings',
        method: 'GET',
        params,
    })
}

// 设备告警列表实时推送
export function getdangerdevivedsse(params) {
    return service({
        url: '/prod-api/dam/api/damwarn/getWarnAndOnlineRateDp',
        method: 'GET',
        params,
    })
}
// 设备告警分页
export function Dangerdevived2(data) {
    return service({
        url: '/prod-api/dam/api/damwarn/page',
        method: 'POST',
        data,
    })
}
// 获取渗压计数据
export function Getshenyaji(data) {
    return service({
        url: '/prod-api/dam/api/damwyljgc/getListForSw',
        method: 'POST',
        data,
    })
}
// 获取渗压计数据列表
export function getshenyajilist(data) {
    return service({
        // url: '/auth/dam/api/damwyljgc/list',
        url: '/prod-api/dam/api/damwyljgc/getRealTimeDataByKh',
        method: 'POST',
        data,
    })
}
// 获取渗流计数据
export function Getshenliuji(data) {
    return service({
        url: '/prod-api/dam/api/damwlsysslgcjl/getListForSw',
        method: 'POST',
        data,
    })
}


// 获取雨水情数据
export function Getyushuiqing(params) {
    return service({
        url: '/prod-api/hym/api/rsvr-river/queryAvgGRoupByStcd',
        method: 'GET',
        params,
    })
}

// 获取视频
export function getvideo(params) {
    return service({
        url: '/prod-api/gate/api/rtuvideob/detail',  //通过id获取视频流
        method: 'GET',
        params,
    })
}


// 获取
export function getvideolist(data) {
    return service({
        url: '/prod-api/gate/api/rtuvideob/listByEnvironment',  //通过id获取视频流
        method: 'POST',
        data,
    })
}


// 获取水库总库容数据接口和水位检测指标
export function Getshuikudata(data) {
    return service({
        url: '/prod-api/hym/api/attresb/list',
        method: 'POST',
        data,
    })
}


// 获取水库数据接口
export function getshuikudata2(data) {
    return service({
        url: '/prod-api/hym/api/fhgcrwacdr/list',
        method: 'POST',
        data,
    })
}


// 获取水库实时水位
export function getshuikudata3(params) {
    return service({
        url: '/prod-api/hym/api/attresb/getWaterLevelAndCapacity',
        method: 'GET',
        params,
    })
}

// 获取实时出库流量
export function getchukulldata(params) {
    return service({
        url: '/prod-api/hym/api/st-flow-r/real/realTime',
        method: 'GET',
        params,
    })
}
// 实时天气接口
export function getnowweather(params) {
    return service({
        url: '/prod-api/hym/api/weather/nowDp',
        method: 'GET',
        params,

    })
}
// 获取七天天气预报
export function getsevenweather(params) {
    return service({
        url: '/prod-api/hym/api/weather/daily',
        method: 'GET',
        params,
    })
}
// 时间段内每日天气接口
export function getsevenweather2(params) {
    return service({
        url: '/prod-api/hym/api/weather/dailyByDateSlot',
        method: 'GET',
        params,
    })
}


// 获取水质检测数据接口
export function Getshuizhidata(data) {
    return service({
        url: '/prod-api/hym/api/hydriwqamdw/newestData',
        method: 'POST',
        data,
    })
}

// 获取水质检测sse推送接口
export function Getshuizhissedata(data) {
    return service({
        url: '/prod-api/hym/api/hydriwqamdw/sseDp',
        method: 'POST',
        data,
    })
}

// 水质检测指标接口
export function Getshuizhizhibiao(data) {
    return service({
        url: '/prod-api/hym/api/hydriwqamdw/qwList',
        method: 'POST',
        data,
    })
}
// 获取水库情况数据接口
export function getshuikudata(params) {
    return service({
        url: '/prod-api/hym/api/st-rsvr-r/real/realTime',
        method: 'GET',
        params,
    })
}
// 获取水库情况闸门状态接口
export function getzhamstatus(params) {
    return service({
        url: '/prod-api/gate/api/wrWagaRealVo/getAllWagaRealAndBaseDataVoByCodeDp',
        method: 'GET',
        params,
    })
}
// 获取雨水情列表数据接口
export function getyushuidata(params) {
    return service({
        url: '/prod-api/hym/api/st-pptn-r/real/realTime',
        method: 'GET',
        params,
    })
}

// 获取水情水位详情数据接口
export function getshuiqingdata(params) {
    return service({
        url: '/prod-api/hym/api/water-overview/queryAvgGroupByType',
        method: 'GET',
        params,
    })
}

// 获取水位列表数据接口
export function getshuiweidata(params) {
    return service({
        url: '/prod-api/hym/api/rsvr-river/getNewestDataByStcdListDp',
        method: 'GET',
        params,
    })
}

// 根据设备编号和时间查询水位设备的历史数据
export function getshuiweicode(params) {
    return service({
        url: '/prod-api/hym/api/water-overview/queryAvgGroupByType',
        method: 'GET',
        params,
    })
}

// 获取雨水情设备数据详情
export function getyushuixqdata(params) {
    return service({
        url: '/prod-api/hym/api/rainfall-overview/queryTotalGroupByType',
        method: 'GET',
        params,
    })
}
// 获取所有设备数据
export function getdevicedalldata(params) {
    return service({
        url: '/prod-api/dam/api/dam-overview/getNewestDataForSw',
        method: 'GET',
        params,
    })
}


// 获取所有设备数据
export function getshexiangtoudata(data) {
    return service({
        url: '/prod-api/gate/api/rtuvideob/list',
        method: 'POST',
        data,
    })
}


// 根据摄像头id获取设备数据
export function getshexiangtouId(params) {
    return service({
        url: '/prod-api/gate/api/rtuvideob/detail',
        method: 'GET',
        params,
    })
}


// 水平位移观测接口
export function getbxjcX(data) {
    return service({
        url: '/prod-api/dam/api/damwspwygc/page',
        method: 'POST',
        data,
    })
}


// 水平位移观测接口
export function getbxjcY(data) {
    return service({
        url: '/prod-api/dam/api/damwczwygc/page',
        method: 'POST',
        data,
    })
}

// 告警信息总览
export function getgaojinAll(data) {
    return service({
        url: '/prod-api/dam/api/damwarn/getWarnOverviewDp',
        method: 'POST',
        data,
    })
}
